package com.dorm.cj.extension.filter;

import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import java.io.IOException;

/**
 * 过滤器
 * Filter前处理 --> Interceptor前处理 --> controller--> Interceptor后处理 --> Filter后处理
 */

@WebFilter(filterName = "myFilter",urlPatterns = "/*")
public class TestFilter implements Filter {

    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
        filterChain.doFilter(servletRequest,servletResponse);
    }
}
